Plugins.load( "../../jiggyface/jigglins/jiggy.UIKit.js" );
include("../../libraries/jiggy.magic.js");
include("../../libraries/jiggy.objects.js");


var fullRect = Rectangle( UIHardware.fullScreenApplicationContentRect );
var mainWindow = new UIWindow( fullRect );
mainWindow.setHidden( false );
mainWindow.orderFront();
mainWindow.makeKey();
mainWindow.backgroundColor = Color.white;


var settingsView = new UIView();
settingsView.backgroundColor = Color.black;
var settingsNavBar = new UINavigationBar([0, 0, mainWindow.bounds[2], 40]);
settingsNavBar.showButtonsWithLeftTitle("Back", null, true);
settingsView.addSubview(settingsNavBar);


var mainView = new UIView();		// Default is container size?
var mainNavBar = new UINavigationBar([0, 0, mainWindow.bounds[2], 40]);
mainNavBar.showButtonsWithLeftTitle(null, "Settings", false);
mainNavBar.setAccessoryView(settingsView);
mainView.addSubview(mainNavBar);
 
mainWindow.setContentView( mainView );

